package practice8;

import java.util.Scanner;

public class P3 {

	static int[] count=new int[26];	
	
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		String S=sc.next();
		int max=0;
		for(int i=0;i<S.length();i++) {
			int index=S.charAt(i)-'A';
			count[index]++;
			if(count[index]>max) {
				max=count[index];
			}
		}
		for(int i=0;i<26;i++) {
			if(count[i]==max) {
				System.out.print((char)(i+'A'));
			}
		}
	}

}
